//引入http组件
let http = require('http')
//创建服务器
let server = http.createServer((req,res) =>{
   res.setHeader('Contene-type','text/html;charset="utf-8"');
   res.chunkedEncoding('您一进入服务器')
   if(req.url == '/' || req.url == '/index'){
       res.end('首页')
   }else if(req.url == '/login'){
    res.end('登入界面');
   }else if(req.url == '/reg'){
    res.end('注册界面');
   }else if(req.url == '/user'){
    res.end('用户中心');
   }else{
    res.end('404 NOT FOUND');
}s
})
//绑定端口
server.listen(80,'www.js1234.com',()=>{
    console.console.log('开启服务');
});